USE [RD_APMart]
GO

Truncate table dbo.AP_Star_Facts
go



/****** Object:  Index [IX_Facts_BusinessUnitID]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_BusinessUnitID')
DROP INDEX [IX_Facts_BusinessUnitID] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_CompanyID]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_CompanyID')
DROP INDEX [IX_Facts_CompanyID] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_CompanyNumberID]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_CompanyNumberID')
DROP INDEX [IX_Facts_CompanyNumberID] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_DiscountDueDate]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_DiscountDueDate')
DROP INDEX [IX_Facts_DiscountDueDate] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_DocumentType]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_DocumentType')
DROP INDEX [IX_Facts_DocumentType] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_DueDate]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_DueDate')
DROP INDEX [IX_Facts_DueDate] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_GLDate]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_GLDate')
DROP INDEX [IX_Facts_GLDate] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_HBatchDate]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_HBatchDate')
DROP INDEX [IX_Facts_HBatchDate] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_HCheckItemDate]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_HCheckItemDate')
DROP INDEX [IX_Facts_HCheckItemDate] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_HClearedValueDate]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_HClearedValueDate')
DROP INDEX [IX_Facts_HClearedValueDate] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_HGLVoidDate]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_HGLVoidDate')
DROP INDEX [IX_Facts_HGLVoidDate] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_InternalPaymentID]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_InternalPaymentID')
DROP INDEX [IX_Facts_InternalPaymentID] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_InvoiceDate]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_InvoiceDate')
DROP INDEX [IX_Facts_InvoiceDate] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_MetricType]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_MetricType')
DROP INDEX [IX_Facts_MetricType] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_PaymentTermsID]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_PaymentTermsID')
DROP INDEX [IX_Facts_PaymentTermsID] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_ServiceDateTax]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_ServiceDateTax')
DROP INDEX [IX_Facts_ServiceDateTax] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_SupplierNumberID]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_SupplierNumberID')
DROP INDEX [IX_Facts_SupplierNumberID] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_TypeID]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_TypeID')
DROP INDEX [IX_Facts_TypeID] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [IX_Facts_UserReservedDate]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'IX_Facts_UserReservedDate')
DROP INDEX [IX_Facts_UserReservedDate] ON [dbo].[AP_Star_Facts] WITH ( ONLINE = OFF )
GO

/****** Object:  Index [PK_AP_Star_Facts]    Script Date: 09/08/2011 09:36:14 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AP_Star_Facts]') AND name = N'PK_AP_Star_Facts')
ALTER TABLE [dbo].[AP_Star_Facts] DROP CONSTRAINT [PK_AP_Star_Facts]
GO


